package com.lh.java.bitset;

import java.util.BitSet;

public class TestCapacityBitSet {

	/**
	 * 功能描述  
	 * @Author: lh  2013-4-18 下午12:01:32
	 */
	public static void main(String[] args) {
		System.gc();
		String toBefor = Runtime.getRuntime().maxMemory()/1024/1024+"M";
		String free = Runtime.getRuntime().freeMemory()/1024/1024+"M";
		System.out.println(toBefor+"   "+free);
//		long size = 1024*1024*1024*8;
		final int   MAX_VALUE = 0x7fffffff;
		BitSet b = new BitSet(MAX_VALUE);
		b.clear();
		System.out.println(Runtime.getRuntime().maxMemory()/1024/1024+"M"+"  "+Runtime.getRuntime().freeMemory()/1024/1024+"M");
		b =null;
		System.gc();
		System.out.println(Runtime.getRuntime().maxMemory()/1024/1024+"M"+"  "+Runtime.getRuntime().freeMemory()/1024/1024+"M");
	}

}
